<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkStatisticsDataQueryRequest extends Request
{
    /**
     * 多多进宝数据统计查询接口
     * @var string
     */
    private $type = 'pdd.ddk.statistics.data.query';

    /**
     * 分页数，默认值: 1
     * @var
     */
    private $page;

    /**
     * 每页结果数，默认值: 20
     * @var
     */
    private $pageSize;

    /**
     * 周期类型: 1-每7天，2-自然月
     * @var
     */
    private $periodType;

    /**
     * 数据类型: 1-增量补贴数据
     * @var
     */
    private $statisticsType;

    /**
     * 查询时间点，格式: "yyyy-MM-dd"。period_type为1时，查询时间点前7天的数据；period_type为2时，查询时间点所在自然月的数据。
     * @var
     */
    private $time;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setPage($page)
    {
        $this->page = $page;
    }

    public function getPage()
    {
        return $this->page;
    }

    public function setPageSize($pageSize)
    {
        $this->pageSize = $pageSize;
    }

    public function getPageSize()
    {
        return $this->pageSize;
    }

    public function setPeriodType($periodType)
    {
        $this->periodType = $periodType;
    }

    public function getPeriodType()
    {
        return $this->periodType;
    }

    public function setStatisticsType($statisticsType)
    {
        $this->statisticsType = $statisticsType;
    }

    public function getStatisticsType()
    {
        return $this->statisticsType;
    }

    public function setTime($time)
    {
        $this->time = $time;
    }

    public function getTime()
    {
        return $this->time;
    }

    public function getParams()
    {
        $params = [
            'type'            => $this->type,
            'page'            => $this->page,
            'page_size'       => $this->pageSize,
            'period_type'     => $this->periodType,
            'statistics_type' => $this->statisticsType,
            'time'            => $this->time,
        ];
        return array_filter($params);
    }
}
